SpatialStream® Code Examples

County Identify

Using County Boundaries, GetByGeometry, and GetMap SpatialStream® components, you can display county boundaries in your mapping application and use server-side highlight techniques to provide identify functionality. This example will demonstrate how to display county boundaries and add highlight behavior with information return in a balloon. The County Boundaries data component gives you access to nationwide county boundaries. The GetByGeometry component returns features at the mouse-click location, and GetMap displays the boundaries and the identified feature.

The advantage of the server-side highlight technique is that it gives you highly responsive interactivity with complex features and/or large data sets.

County Boundaries | GetMap | GetByGeometry

var county = new Dmp.Layer.WMSLayer("boundary", "SS", {
antiAlias: true
});
county.addChild("countyPoly", "DMP_LICENSE/COUNTY", "$(ACCOUNT_FOLDER)SLD/SimpleBoundary.sld.xml", {
zoomRange: {
min: 5, max: 19
}
});
county.addChild("countyLabel", "DMP_LICENSE/COUNTY", "$(ACCOUNT_FOLDER)SLD/CountyLabel.sld.xml", {
zoomRange: {
min: 7, max: 19
}
});
map.addLayer(county);

//----------------

var url = "getByGeometry.aspx" +
"?returnGeoType=1" +
"&dataSource=DMP_LICENSE/County" +
"&Geo=POINT(" + latLong.Longitude + " " + latLong.Latitude + ")" +
"&fields=NAME,_DMP_ID";
Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback);


Run Sample   View Video   Back To Index